<?php 
    $link_beranda = "";
    $link_master = "";
    $link_master_blok = "";
    $link_sekolah = "";
    $link_sekolah_blok = "";
    $link_jadwal = "";
    $link_jadwal_blok = "";
    $link_modul = "";
    $link_modul_blok = "";
    switch ($bagian['position'])
    {
        case 1:
            $link_beranda = 'active ';
        break;
        case 2:
            $link_sekolah = 'active ';
            $link_sekolah_blok = ' style="display: block;"';
        break;
        case 3:
            $link_jadwal = "active ";
            $link_jadwal_blok = ' style="display: block;"';
        break;
        case 4:
            $link_modul = "active ";
            $link_modul_blok = ' style="display: block;"';
        break;
        case 5:
            $link_master = 'active ';
            $link_master_blok = ' style="display: block;"';
        break;
    }
?>
<ul class="nav nav-tabs nav-stacked">
    <li class="nav-header">Menu</li>
    <li class="<?php echo $link_beranda ?>"><a href="<?php echo site_url("admin") ?>"><span class="icon-home"></span> Beranda</a></li>
    <li class="<?php echo $link_sekolah ?>dropdown"><a href="#"><span class="icon-book"></span> Data Sekolah</a>
        <ul<?php echo $link_sekolah_blok ?>>
            <li><a href="<?php echo site_url("admin/data_siswa") ?>">Data Siswa</a></li>
            <li><a href="<?php echo site_url("admin/data_guru") ?>">Data Guru</a></li>
            <li><a href="<?php echo site_url("admin/data_kelas") ?>">Data Kelas dan Ruangan</a></li>
            <li><a href="<?php echo site_url("admin/wali_kelas") ?>">Data Wali Kelas</a></li>
            <li><a href="<?php echo site_url("admin/pelajaran") ?>">Data Pelajaran</a></li>
            <li><a href="<?php echo site_url("admin/adm_login_siswa") ?>"><span class="iconfa-user"></span> Data Login Siswa</a></li>
            <li><a href="<?php echo site_url("admin/adm_login") ?>"><span class="iconfa-user-md"></span> Data Login Guru</a></li>
        </ul>
    </li>
    <li class="<?php echo $link_jadwal ?>dropdown"><a href="#"><span class="icon-calendar"></span> Penjadwalan</a>
        <ul<?php echo $link_jadwal_blok ?>>
            <li><a href="<?php echo site_url("admin/jadwal") ?>">Jadwal Pelajaran</a></li>
        </ul>
    </li>
    <li class="<?php echo $link_modul ?>dropdown"><a href="#"><span class="icon-folder-open"></span> Modul Aplikasi</a>
        <ul<?php echo $link_modul_blok ?>>
            <li><a href="<?php echo site_url("admin/berita") ?>"><span class="icon-book"></span> Berita Akademik</a></li>
            <li><a href="<?php echo site_url("admin/akademik") ?>"><span class="icon-briefcase"></span> Laporan Akademik</a></li>
            <li><a href="<?php echo site_url("admin/set_tahun_pelajaran") ?>"><span class="icon-list-alt"></span> Set Tahun Pelajaran</a></li>
            <li><a href="<?php echo site_url("admin/set_kenaikan_kelas") ?>"><span class="icon-resize-full"></span> Set Kenaikan Kelas</a></li>
            <li><a href="<?php echo site_url("admin/nilai_siswa") ?>"><span class="icon-star"></span> Nilai Siswa</a></li>
            <li><a href="<?php echo site_url("admin/absensi_siswa") ?>"><span class="icon-calendar"></span> Absensi Siswa</a></li>
        </ul>
    </li>
</ul>